import request from '@/utils/request'

// 获取筛选条件
export const queryAllDisease = params => {
	return request({
		url: '/app-api/mobile/dybz/patient/disease/getDiseaseTree',
		method: 'GET',
		params
	})
}

export const getDepartTree = params => {
	return request({
		url: '/app-api/mobile/dybz/patient/disease/getDepartTree',
		method: 'GET',
		params
	})
}

export const queryTitleType = params => {
	return request({
		url: '/app-api/mobile/dybz/patient/hospital/queryTitleType',
		method: 'GET',
		params
	})
}

export const queryHospitaltype = params => {
	return request({
		url: '/app-api/mobile/dybz/patient/hospital/queryHospitaltype',
		method: 'GET',
		params
	})
}

export const queryHospitallevel = params => {
	return request({
		url: '/app-api/mobile/dybz/patient/hospital/queryHospitallevel',
		method: 'GET',
		params
	})
}



// 获取 预约 医生列表
export const queryAppointDoctorList = data => {
	return request({
		url: '/app-api/mobile/dybz/patient/appoint/queryAppointDoctorList',
		method: 'POST',
		data
	})
}

// 获取 普通/专家 医生列表
export const queryDoctorList = data => {
	return request({
		url: '/app-api/mobile/dybz/patient/index/queryDoctorList',
		method: 'GET',
		data
	})
}

// 获取 普通/专家 医生列表
export const queryDoctorDetail = data => {
	return request({
		url: '/app-api/mobile/dybz/patient/outpatient/queryDoctorDetail',
		method: 'GET',
		data
	})
}

// 新增预约
export const insertAppointInfo = data => {
	return request({
		url: '/app-api/mobile/dybz/patient/appoint/insertAppointInfo',
		method: 'POST',
		data
	})
}

export const queryMyAppointList = data => {
	return request({
		url: '/app-api/mobile/dybz/patient/appoint/queryMyAppointList',
		method: 'POST',
		data
	})
}

export const queryMyAppointDetail = params => {
	return request({
		url: '/app-api/mobile/dybz/patient/appoint/queryMyAppointDetail',
		method: 'GET',
		params
	})
}



// 患者
export const queryPatientInfoList = data => {
	return request({
		url: '/app-api/mobile/dybz/patient/info/queryPatientInfoList',
		method: 'GET',
		data
	})
}

export const insertPatientInfo = (data) => {
	return request({
		url: '/app-api/mobile/dybz/patient/info/insertPatientInfo',
		method: 'POST',
		data
	})
}

export const updatePatientInfo = (data) => {
	return request({
		url: '/app-api/mobile/dybz/patient/info/updatePatientInfo',
		method: 'POST',
		data
	})
}

export const queryPatientInfo = () => {
	return request({
		url: '/app-api/mobile/dybz/patient/info/queryPatientInfo',
		method: 'GET',
	})
}



// 我的问诊
export const queryPatientOutpatientInfo = (data) => {
	return request({
		url: '/app-api/mobile/dybz/patient/outpatient/queryPatientOutpatientInfo',
		method: 'GET',
		data
	})
}

export const queryoutpatientInfoDetail = (params) => {
	return request({
		url: '/app-api/mobile/dybz/patient/consultation/queryoutpatientInfoDetail',
		method: 'GET',
		params
	})
}

export const getlastPatientOutpatientInfo = (params) => {
	return request({
		url: '/app-api/mobile/dybz/patient/consultation/getlastPatientOutpatientInfo',
		method: 'GET',
		params
	})
}

export const insertoutpatientInfo = (data) => {
	return request({
		url: '/app-api/mobile/dybz/patient/consultation/insertoutpatientInfo',
		method: 'POST',
		data
	})
}




// 我的关注

export const insertMyFollow = (data) => {
	return request({
		url: '/app-api/mobile/dybz/patient/follow/insertMyFollow',
		method: 'POST',
		data
	})
}

export const queryMyFollow = data => {
	return request({
		url: '/app-api/mobile/dybz/patient/follow/queryMyFollow',
		method: 'GET',
		data
	})
}

export const cancelMyFollow = params => {
	return request({
		url: '/app-api/mobile/dybz/patient/follow/cancelMyFollow',
		method: 'POST',
		params
	})
}


// 问诊单
export const insertConsultationForm = data => {
	return request({
		url: '/app-api/mobile/dybz/patient/consultation/insertConsultationForm',
		method: 'POST',
		data
	})
}

export const insertappointConsultationForm = data => {
	return request({
		url: '/app-api/mobile/dybz/patient/consultation/insertappointConsultationForm',
		method: 'POST',
		data
	})
}

export const queryConsultationFormList = data => {
	return request({
		url: '/app-api/mobile/dybz/patient/consultation/queryConsultationFormList',
		method: 'GET',
		data
	})
}

export const queryConsultationFormDetail = data => {
	return request({
		url: '/app-api/mobile/dybz/patient/consultation/queryConsultationFormDetail',
		method: 'GET',
		data
	})
}


// 我的处方
export const queryPrescriptionInfoList = data => {
	return request({
		url: '/app-api/mobile/dybz/patient/outpatient/queryPrescriptionInfoList',
		method: 'GET',
		data
	})
}

export const queryPrescriptionInfoDetail = (data) => {
	return request({
		url: '/app-api/mobile/dybz/patient/outpatient/queryPrescriptionInfoDetail',
		method: 'GET',
		data
	})
}

export const getMyDoctorInfoList = (data) => {
	return request({
		url: '/app-api/mobile/dybz/patient/outpatient/getMyDoctorInfoList',
		method: 'GET',
		data
	})
}

// 订单
export const getOrderInfoPage = (data) => {
	return request({
		url: '/app-api/mobile/dybz/patient/mypayorder/getOrderInfoPage',
		method: 'GET',
		data
	})
}

export const getOrderInfoDetail = (params) => {
	return request({
		url: '/app-api/mobile/dybz/patient/mypayorder/getOrderInfoDetail',
		method: 'GET',
		params
	})
}

export const createOrderInfo = (data) => {
	return request({
		url: '/app-api/mobile/dybz/patient/mypayorder/createOrderInfo',
		method: 'POST',
		data
	})
}

export const deleteOrderInfo = (params) => {
	return request({
		url: '/app-api/mobile/dybz/patient/mypayorder/deleteOrderInfo',
		method: 'delete',
		params
	})
}


// 我的病例
export const getMymedicalrecord = (params) => {
	return request({
		url: '/app-api/mobile/dybz/patient/outpatient/getMymedicalrecord',
		method: 'GET',
		params
	})
}

export const getMymedicalrecordDetail = (params) => {
	return request({
		url: '/app-api/mobile/dybz/patient/outpatient/getMymedicalrecordDetail',
		method: 'GET',
		params
	})
}

// 在线续方
export const getOnlinePreFormPage = (params) => {
	return request({
		url: '/app-api/mobile/dybz/patient/onlinePreForm/getOnlinePreFormPage',
		method: 'GET',
		params
	})
}

export const getOnlinePreFromDetail = (params) => {
	return request({
		url: '/app-api/mobile/dybz/patient/onlinePreForm/getOnlinePreFromDetail',
		method: 'GET',
		params
	})
}

export const createonlinePreForm = (data) => {
	return request({
		url: '/app-api/mobile/dybz/patient/onlinePreForm/createonlinePreForm',
		method: 'POST',
		data
	})
}

// 我的会诊
export const queryMyConsultationInfoList = (params) => {
	return request({
		url: '/app-api/mobile/dybz/patient/outpatient/queryMyConsultationInfoList',
		method: 'GET',
		params
	})
}

export const queryMyConsultationInfoDetail = (params) => {
	return request({
		url: '/app-api/mobile/dybz/patient/outpatient/queryMyConsultationInfoDetail',
		method: 'GET',
		params
	})
}

